<#include "/common/layout.html"> <@header> </@header> <@body>
<div class="content-wrapper">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			<small>职位管理 > 职位列表</small>
		</h1>
	</section>
	<!-- Main content -->
	<section class="content">
		<!-- Your Page Content Here -->
		<div class="row">
			<div class="col-xs-12">
				<div class="box">
					<div class="box-header">
						<form class="form-inline"
							action="${base}/jobMessage/showjobMessage/1" method="get">
							<div class="input-group">
								<input type="text" name="brand" value="${phoneLog.brand!}"
									class="form-control" placeholder="请输手机品牌">
								<div class="input-group-btn">
									<button class="btn btn-default" type="submit">
										<i class="fa fa-search"></i>
									</button>
									<a href="${base}/jobMessage/showjobMessage/1"
										class="btn btn-default"><i class="fa fa-refresh"></i></a>
								</div>
							</div>
							<div class="input-group pull-right">
								<button type="button" class="btn btn-primary btn-flat"
									onclick="exportTo('职位数据');">
									<i class="fa fa-file-excel-o"></i> 导出
								</button>
							</div>
						</form>
					</div>
					<div class="box-body table-responsive no-padding">
						<table class="table table-hover">
							<tr>
								<th width="100px"><input name="colIndex" type="checkbox"
									class="minimal checkbox-toolbar"> 行号</th>
								<th>职位名称</th>
								<th>技能要求</th>
								<th>工作年限</th>
								<th>薪资范围</th>
								<th>学历要求</th>
								<th>职位状态</th>
								<th>更新时间</th>
								<th>更新人</th>
								<th>发布园所</th>
								<th>负责人</th>
								<th>园所电话</th>
								<th>园所地址</th>
								<th>园所性质</th>
								<th width="120px">操作</th>
							</tr>
						    <#list list as job>
							
							<tr>
								<td><label> <input type="checkbox"
										class="minimal checkbox-item"> ${((job_index)+1)!}
								</label></td>
								<td>${(job.jobName)!}</td>
								<td>${(job.needSkills)!}</td>
								<td>${(job.workYears)!}</td>
								<td>${(job.salaryRange)!}</td>
								<td>${(job.edu)!}</td>
								<td>${(job.status)!}</td>
								<td>${(job.updateTime)!}</td>
								<td>${(job.updateMan)!}</td>
								<td>${(job.parkname)!}</td>
								<td>${(job.president)!}</td>
								<td>${(job.phone)!}</td>
								<td>${(job.address)!}</td>
								<td>${(job.parkNature)!}</td>
							   <td>
				                <a class="btn btn-primary btn-xs dialog" href="javascript:" data-url="${base}/jobMessage/editMessagePage/${(job.id)!}" data-title="编辑" data-width="850" data-height="550">编辑</a>
				               </td>
							</tr>
						</#list>
						</table>
					</div>
					<!-- /.box-body -->
					<div class="box-footer row">
						<div class="col-md-6"><#include "/common/paginateBar.html"
							/> <@paginate pageData=pageData
							actionUrl="${base}/jobMessage/showjobMessage/"
							urlParas="?search=${search!}&daterange=${daterange!}" /></div>
						<div class="col-md-6 pull-left"><#include
							"/common/paginate.html" /> <@paginate
							currentPage=pageData.getCurrent() totalPage=pageData.getPages()
							actionUrl="${base}/jobMessage/showjobMessage"
							urlParas="?search=${search!}&daterange=${daterange!}&pageSize=${pageSize!}"
							/></div>
					</div>
				</div>
				<!-- /.box -->
			</div>
		</div>
	</section>
	<!-- /.content -->
</div>
<!-- /.content-wrapper -->
</@body> <@footer>
<script>

	function getBoforeDate(before){
		var now = new Date();
		now.setDate(now.getDate()-before);
		return now;
	}
	
	function getBoforeMonth(beforeMonth,day){
		var now = new Date();
		now.setDate(day);
		now.setMonth(now.getMonth()-beforeMonth);
		return now;
	}
	
	$(function(){
		
		var now = new Date();
		
		$('.date').daterangepicker({
		    "showWeekNumbers": true,
		    "showISOWeekNumbers": true,
		    "ranges": {
		        "今天": [
		            now,
		            now
		        ],
		        "昨天": [
					getBoforeDate(1),
					getBoforeDate(1)
		        ],
		        "最近7天": [
					getBoforeDate(7),
					now
		        ],
		        "最近30天": [
		            getBoforeDate(30),
		            now
		        ],
		        "本月": [
		            getBoforeMonth(0,1),
		            getBoforeMonth(0,31)
		        ],
		        "上个月": [
					getBoforeMonth(1,1),
					getBoforeMonth(1,31)
		        ],
		        "最近三个月": [
						getBoforeMonth(2,1),
						getBoforeMonth(0,31)
			        ]
		    },
		    "locale": {
		        "format": "YYYY/MM/DD",
		        "separator": "-",
		        "applyLabel": "应用",
		        "cancelLabel": "取消",
		        "fromLabel": "From",
		        "toLabel": "To",
		        "customRangeLabel": "自定义",
		        "weekLabel": "W",
		        "daysOfWeek": [
		            "日",
		            "一",
		            "二",
		            "三",
		            "四",
		            "五",
		            "六"
		        ],
		        "monthNames": [
		            "一月",
		            "二月",
		            "三月",
		            "四月",
		            "五月",
		            "六月",
		            "七月",
		            "八月",
		            "九月",
		            "十月",
		            "十一月",
		            "十二月"
		        ],
		        "firstDay": 1
		    },
		    "alwaysShowCalendars": true,
		    "autoUpdateInput":false,
		    "opens": "right",
		    "buttonClasses": "btn btn-sm"
		}, function(start, end, label) {
		  console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
		});
		
		$('.date').on('apply.daterangepicker', function(ev, picker) {
            $(this).val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
        });

        $('.date').on('cancel.daterangepicker', function(ev, picker) {
            $(this).val('');
        });
		
	});
</script>
</@footer>
